import { getDetailList,getDetailListb } from '../../api/request'
// import getRes from '../../components/login/Login'
export default {
    namespaced: true,
    state: {
        detailList:[],
        detailListb:[],
        detaRes:[],
    },
    getters: {

    },
    mutations: {
        // 详情页面top ht
        getDetailList(state,data){
            state.detailList = data
        },
        getDetailListb(state,data){
            state.detailListb = data
        },
        getRes(state,res){
            state.dataRes = res
            console.log(state)
        }
    },
    actions: {
        // 详情页面top ht
        async setDetailList({ commit }){
            let res = await getDetailList()
            commit('getDetailList',res.data.data)
        },
        async setDetailListb({ commit }){
            let res = await getDetailListb()
            commit('getDetailListb',res.data.data.list)
        },
        async setRes({ commit }){
            let res = await getRes()
            commit('getRes',res.data.data.data.name)
        }
    }
}